function vid2img(vidfile)
rmdir('jpg', 's')
mkdir('jpg')
command = 'mplayer\mplayer.exe -vo jpeg VIDFILE';
command = strrep(command, 'VIDFILE', vidfile);
system(command);
movefile('*.jpg', 'jpg');